﻿
-- project
set_project("win_crash_report")

-- set xmake minimum version
set_xmakever("2.5.1")

-- set project version
set_version("1.0.0", {build = "%Y%m%d%H%M"})

-- add build modes
add_rules("mode.release", "mode.debug", "mode.profile", "mode.coverage")-- TODO, "mode.valgrind", "mode.asan", "mode.tsan", "mode.ubsan") -- for xmake v2.3.3


target("win_crash_report")
    -- make as a static library
    set_kind("static")

    -- set warning all as error
    set_warnings("all", "error")

    set_languages("c++11")
    --set_optimize("fastest")

    -- disable some compiler errors
    add_cxflags("/EHa", "-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno-error=expansion-to-defined", "-Wno-unused-parameter", "-fPIC", "-DWIN32_LEAN_AND_MEAN")
    add_mxflags("-Wno-error=deprecated-declarations", "-fno-strict-aliasing", "-Wno-error=expansion-to-defined", "-fPIC")


		-- add include directories
    add_includedirs("./", {public = true})
    
    
    -- add the common source files
    add_files("./*.cpp")


